CREATE TABLE IF NOT EXISTS `{$tableName}` (
      `document_id` int(11) NOT NULL,
	  `document_uid` int(11) NOT NULL default '0',
	  `document_author` varchar(50) NULL,
	  `document_creationdate` datetime,
	  `document_modificationdate` datetime,
	  `document_lang` varchar(5),
	  `document_revision` int(11),
	  `document_label` varchar(255),
{$fields}
	   PRIMARY KEY (`document_id`,`document_uid`),
       FOREIGN KEY (`document_uid`) REFERENCES `f_document` (`document_uid`) ON DELETE CASCADE,
       FOREIGN KEY (`document_id`) REFERENCES `{$originalTableName}` (`document_id`) ON DELETE CASCADE
	) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;